# -*- coding:utf-8 -*-
#2022/1/20 10:13
# author:xwl
from fastapi import APIRouter, Depends

from backend.app.app.api.api_Xiong.crud.pub_crud import well_output_save_data
from backend.app.app.api.api_Xiong.models.x_model import well_output_save_model
from backend.app.app.api.api_v1.user import verify_token_user

well_output = APIRouter(prefix="/well_output", tags=["单井措施方案经济评价输出数据"])

@well_output.post("/save", name="存库")
async  def save_lib(data: well_output_save_model,ver = Depends(verify_token_user)):
    result = well_output_save_data(data.datas)
    return {
        'result': result if result else {},
        'verify': ver
    }